package com.woniuxy01;

/**
 * @author 作者
 * @create 2025-11-05 9:33
 */
public class Test02 {
    public static void main(String[] args) {
        String s1="Abc";
        String s2="abc";
        System.out.println(s1.equals(s2));
        System.out.println(s1.compareTo(s2));
        System.out.println(s1.compareToIgnoreCase(s2));

    }

    private static void test04() {
        String s1="abjavacdjavaefgjava";
        System.out.println(s1.replace('a', 'm'));
        System.out.println(s1.replace("java","HTML"));
        String s2="     aaaaaaaa     ";
        System.out.println(s2);
        System.out.println(s2.trim());
    }

    private static void test03() {
        String s1="abcdefgHIJKL";
        System.out.println(s1.toUpperCase());
        System.out.println(s1.toLowerCase());

        String s2="xyz";
        System.out.println(s1.concat(s2));
        System.out.println(s1+s2);
    }

    private static void test01() {
        char[] chars=new char[]{'a','b','c'};

        String s1 = String.valueOf(chars);
        System.out.println(s1);

        String s2 = new String(chars);
        System.out.println(s2);

        //int转String
        int i=1;
        String s3 = String.valueOf(i);
        System.out.println(s3);
        System.out.println();

        String s4=i+"";
        System.out.println(s4);
    }


}
